﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>jQuery Watermark</title>
<link type="text/css" href="jquery.watermark.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="jquery.watermark.js"></script>
<script>
$(function() { // Shorthand for $(document).ready(function() {
	$('input.wmark').watermark();
	$('#submit').click(function() {
		$('input.wmark').clearWatermark();
		alert('Welcome ' + $('#first').val() + ' ' + $('#last').val());
		$('input.wmark').blur();
	});
});
</script>
</head>
<body>
<h1>jQuery Watermark</h1>
<p>
	<input type="text" id="first" class="wmark" title="Your first name">
	<input type="text" id="last" class="wmark" title="Your last name">
	<input type="button" id="submit" value="Submit">
</p>
</body>
</html>
